
package com.xbongbong.admin.domain.entity;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.toolbox.wrap.Entity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
* @author autoGen
* @time 2019-09-18 13:56:16
*/
@Getter
@Setter
@ToString
public class RaidersCorpEntity extends Entity {

	private static final long serialVersionUID = -1762929879065390048L;

	public RaidersCorpEntity() {
		del = 0;
	}

	public RaidersCorpEntity(String corpid, String creatorId, Long now, Long raidersId, Integer recommend, Integer sort, Integer lock) {
		this.corpid = corpid;
		this.creatorId = creatorId;
		this.addTime = now;
		this.updateTime = now;
		this.del = 0;
		this.raidersId = raidersId;
		this.recommend = recommend;
		this.sort = sort;
		this.totalScore = 0;
		this.stepScore = new JSONArray();
		this.pointState = new JSONArray();
		this.startTime = 0L;
		this.finish = 0;
		this.lock = lock;
	}

	public RaidersCorpEntity (String corpid, String creatorId, Long addTime, Long updateTime,
							  Long raidersId, Integer recommend, Integer sort, Integer lock) {
		this.corpid = corpid;
		this.creatorId = creatorId;
		this.addTime = addTime;
		this.updateTime = updateTime;
		this.del = 0;
		this.raidersId = raidersId;
		this.recommend = recommend;
		this.sort = sort;
		this.totalScore = 0;
		this.stepScore = new JSONArray();
		this.pointState = new JSONArray();
		this.startTime = 0L;
		this.finish = 0;
		this.lock = lock;
	}

	//========== properties ==========

	/**
	* 主键
	*/
	private Long id;
	/**
	* 公司id
	*/
	private String corpid;
	/**
	* 创建者id
	*/
	private String creatorId;
	/**
	* 创建时间时间戳
	*/
	private Long addTime;
	/**
	* 更新时间时间戳
	*/
	private Long updateTime;
	/**
	* 删除标记
	*/
	private Integer del;
	/**
	* 攻略id
	*/
	private Long raidersId;
	/**
	* 是否推荐（1.是 0否 推荐的用户端和设置端都要展示列表）默认0
	*/
	private Integer recommend;
	/**
	* 排序字段（默认为0）
	*/
	private Integer sort;
	/**
	* 总得分 默认0
	*/
	private Integer totalScore;
	/**
	* 步骤得分,记录preview、video、operation、invitation的各步骤得分情况[{"step": "", "score": 1, "finish": 1}]
	 其中，实操的finish：0未完成 1已完成 2部分完成
	*/
	private JSONArray stepScore;
	/**
	 * 功能点完成状态[{"pointKey": 4600, "finish": 1}]
	 */
	private JSONArray pointState;
	/**
	* 开始实操的时间
	*/
	private Long startTime;
	/**
	* 是否已完成：0未完成 1已完成 2部分完成，默认0
	 finish == 1，则按钮变为：已完成
	 finish == 2，则按钮变为：继续了解
	 finish == 0 && totalScore == 0，则按钮变为：立即了解
	 finish == 0 && totalScore > 0，则按钮变为：立即了解（+totalScore分）
	 在得分时一定要控制好该值
	*/
	private Integer finish;
	/**
	* 解锁（1已经解锁2未解锁）默认 1
	*/
	private Integer lock;

}

